#ifndef _USER_CONFIG_H
#define _USER_CONFIG_H


/* platformio.ini  相关配置
    [env:uno]
    platform = atmelavr
    board = uno
    framework = arduino
    lib_deps = askuric/Simple FOC@^2.3.5
*/
    

/*----------------About BLDC Motor--------------------*/
#define MOTOR0_POLE_PAIR_NUM         (11)
#define MOTOR1_POLE_PAIR_NUM        (11) 

#define BLDC_VOLTAGE_SUPPLY         (12)    //V

/*----------------About BLDC Driver-------------------*/
#define M0_PWMA_PIN                 (3)
#define M0_PWMB_PIN                 (5)
#define M0_PWMC_PIN                 (6)
#define M0_PWM_EN                   (7)
#define M0_INIT                     3, 5, 6, 7


#define M1_PWMA_PIN                 (9)
#define M1_PWMB_PIN                 (10)
#define M1_PWMC_PIN                 (11)
#define M1_PWM_EN                   (8)
#define M1_INIT                     9, 10,11, 8
/*----------------About BLDC Sensor-------------------*/
/*
    模拟方式
*/
#define M0_MAGNETIC_ANALOG_SENSOR_PIN               (A7)
#define M0_MAGNETIC_ANALOG_SENSOR_MIN               (0)
#define M0_MAGNETIC_ANALOG_SENSOR_MAX               (1024)


#define M1_MAGNETIC_ANALOG_SENSOR_PIN               (A6)
#define M1_MAGNETIC_ANALOG_SENSOR_MIN               (0)
#define M1_MAGNETIC_ANALOG_SENSOR_MAX               (1024)

/* IIC 方式
MagneticSensorI2C sensor_as5600 = MagneticSensorI2C(AS5600_I2C);
MagneticSensorI2C sensor = MagneticSensorI2C(MT6701_I2C);
*/
/*----------------About BLDC DianliuCaiyang------------------*/
#define LED_PIN   13


/*----------------About Control Mode--------------------*/
#define OPEN_LOOP_VELOCITY      (0)
#define CLOSE_LOOP_ANGLE        (1)
#define MOTOR_CONTROL_MODE        (OPEN_LOOP_VELOCITY)

#endif